package com.object_;

public class toString_ {
    public static void  main(String[] args) {
        Monster m1 = new Monster(20, "小钻风" , "巡山");

        System.out.println(m1);
        System.out.println(m1.hashCode());
    }
}


class Monster{
    String name;
    String job;
    int age;

    public Monster(int age, String name, String job) {
        this.age = age;
        this.name = name;
        this.job = job;
    }

//    @Override
//    public String toString() {
//        return "Monster{" +
//                "name='" + name + '\'' +
//                ", job='" + job + '\'' +
//                ", age=" + age +
//                '}';
//    }
}
